﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;
namespace HRMService
{
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IHospital
    {
        [OperationContract]
        int Hospital_Using(int HospitalID);

        [OperationContract]
        DataSet Hospital_GetAll();

        [OperationContract]
        HospitalInfo Hospital_GetInfo(int HospitalID);

        [OperationContract]
        HospitalInfo Hospital_GetInfoByCode(string _Code, string _RegionCode);

        [OperationContract]
        DataSet Hospital_GetList(out int ItemCount, string keyWord, string _RegionCode, int currentPage, int pageSize);

        [OperationContract]
        int Hospital_Insert(HospitalInfo eInfo);

        [OperationContract]
        bool Hospital_Update(HospitalInfo eInfo);

        [OperationContract]
        bool Hospital_Delete(int HospitalID);

         [OperationContract]
        bool Hospital_Exist(int _ID,string _Code);

         [OperationContract]
         bool Hospital_CheckExist(string _HospitalCode, string _RegionCode);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class HospitalInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        string _Code;
        [DataMember]
        public string Code
        {
            get { return _Code; }
            set { _Code = value; }
        }
        string _RegionCode;
        [DataMember]

         public string RegionCode
         {
          get { return _RegionCode; }
          set { _RegionCode = value; }
         }
        string _IsUse;
        [DataMember]

        public string IsUse
        {
            get { return _IsUse; }
            set { _IsUse = value; }
        }
        string _Level;
        [DataMember]

        public string Level
        {
            get { return _Level; }
            set { _Level = value; }
        }
    }

}
